<template>
		<div class="week">
		<!-- 循环展示每一项 -->
		<div class="title">周末去哪儿</div>
		<ul class="recommendList">
			<li class="item" v-for="item of weekendList" :key="item.id">
				<div class="item-imgBox">
					<img :src="item.imgUrl" alt="" class="item-img">
				</div>
				
				<div class="item-info">
					<p class="item-info-title">{{item.title}}</p>
					<p class="item-info-desc">{{item.desc}}</p>
				</div>
			</li>
		</ul>
	</div>
</template>
<script>
export default {
	name: 'homeWeekend',
	props: {
		weekendList: Array
	}
}
</script>
<style scoped>
	/* .item{*每一个Li中的内容应当水平排列 因此对li使用流体布局*
		height: 1.9rem;
		overflow: hidden;
	} */
	/* .week {
		margin-top: .10rem
	} */
	.title {
		background-color: #eee;
		line-height: .8rem;
		text-indent: .2rem;/*首行缩进*/
	}
	.item-imgBox {/*控制图片盒子的宽高比  并让图片充满盒子来布局*/
		height: 0;
		overflow: hidden;
		padding-bottom: 37.09%
	}
	.item-img {
		width: 100%;
	}
	.item-info {
		padding: .2rem;
	}
	.item-info-title {
		line-height: .54rem;
		font-size: .32rem;
	}
	.item-info-desc {
		line-height: .4rem;
		color: #ccc;
	}
	
</style>